package com.ody.util.code.model;

import org.springframework.util.Assert;

public class Model {
	private String name;
	private Object value;
	private boolean repeatable;
	
	public Model() {}
	
	public Model(String name, Object value) {
		this(name, value, false);
	}

	public Model(String name, Object value, boolean repeatable) {
		Assert.notNull(name, "name cannot be null");
		Assert.notNull(value, "value cannot be null");
		this.name = name;
		this.value = value;
		this.repeatable = repeatable;
	}
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Object getValue() {
		return value;
	}
	public void setValue(Object value) {
		this.value = value;
	}
	public boolean isRepeatable() {
		return repeatable;
	}
	public void setRepeatable(boolean repeatable) {
		this.repeatable = repeatable;
	}
}
